namespace CSharpePro._1021;

public class Demo
{
    public void TestPrint()
    {
        Father father = new Father();
        father.print();
        Child child = new Child();
        child.print();
        Console.WriteLine(child.id);
        Father father1 = new Child();
        Father father2 = new Son();
        father2.print();
        father1.print();
        Son son = new Son();
        son.print();
        /*int int32 = Convert.ToInt32("123");
        Student student = new Student();
        student.Id = 1001;
        student.Name = "张三";
        Console.WriteLine(student.Name);
        Student student2 = new Student(1002);
        Console.WriteLine(student2.Id);
        Student student3 = new Student(1003,"李四");
        Console.WriteLine(student3.Name);
        Console.WriteLine(student3.ToString());*/
    }

    public int Compare(int a, int b, int c)
    {
        if (a < b && a > c)
        {
            return a;
        }
        else if (b < a && b > c)
        {
            return b;
        }
        else if (c > a && c > b)
        {
            return c;
        }
        else
        {
            return 0;
        }
        
    } 
}